//
// Created by mgepahmge on 2025/10/27.
//
#include <utils/cudaProfiler.cuh>

namespace myamg {
    cudaScopedProfiler::cudaScopedProfiler(Profiler &profiler, const std::string &name, const std::string &location) {
        cudaDeviceSynchronize();
        timer_ = new Profiler::ScopedTimer(profiler, name, location);
    }

    cudaScopedProfiler::~cudaScopedProfiler() {
        delete timer_;
        cudaDeviceSynchronize();
    }
}
